package soccerBet.project.objects;
// Generated 22/Dez/2013 22:11:24 by Hibernate Tools 3.2.2.GA



import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Runner generated by hbm2java
 */
@Entity
@Table(name="runner"
)
public class Runner  implements java.io.Serializable {


     private Integer idRunner;
     private Apostas apostas;
     private MapeamentoMercados mapeamentoMercados;
     private int selectionId;
     private int estado;
     private Set<Precos> precoses = new HashSet<Precos>(0);
     private Set<Email> emails = new HashSet<Email>(0);

    public Runner() {
    }

	
    public Runner(Apostas apostas, MapeamentoMercados mapeamentoMercados, int selectionId, int estado) {
        this.apostas = apostas;
        this.mapeamentoMercados = mapeamentoMercados;
        this.selectionId = selectionId;
        this.estado = estado;
    }
    public Runner(Apostas apostas, MapeamentoMercados mapeamentoMercados, int selectionId, int estado, Set<Precos> precoses) {
       this.apostas = apostas;
       this.mapeamentoMercados = mapeamentoMercados;
       this.selectionId = selectionId;
       this.estado = estado;
       this.precoses = precoses;
    }
   
     @Id @GeneratedValue(strategy=IDENTITY)
    
    @Column(name="idRunner", unique=true, nullable=false)
    public Integer getIdRunner() {
        return this.idRunner;
    }
    
    public void setIdRunner(Integer idRunner) {
        this.idRunner = idRunner;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="idAposta", nullable=false)
    public Apostas getApostas() {
        return this.apostas;
    }
    
    public void setApostas(Apostas apostas) {
        this.apostas = apostas;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="idMap_Mercado", nullable=false)
    public MapeamentoMercados getMapeamentoMercados() {
        return this.mapeamentoMercados;
    }
    
    public void setMapeamentoMercados(MapeamentoMercados mapeamentoMercados) {
        this.mapeamentoMercados = mapeamentoMercados;
    }
    
    @Column(name="selectionId", nullable=false)
    public int getSelectionId() {
        return this.selectionId;
    }
    
    public void setSelectionId(int selectionId) {
        this.selectionId = selectionId;
    }
    
    @Column(name="estado", nullable=false)
    public int getEstado() {
        return this.estado;
    }
    
    public void setEstado(int estado) {
        this.estado = estado;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="runner")
    public Set<Precos> getPrecoses() {
        return this.precoses;
    }
    
    public void setPrecoses(Set<Precos> precoses) {
        this.precoses = precoses;
    }


    @OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="runner")
    public Set<Email> getEmails() {
        return this.emails;
    }
    
    public void setEmails(Set<Email> emails) {
        this.emails = emails;
    }

}


